package com.qiangesoft.oss.config;

import com.qiangesoft.oss.constant.FileStoreTypeEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 文件配置属性类
 *
 * @author qiangesoft
 * @date 2024-05-13
 */
@Data
@Component
@ConfigurationProperties(prefix = "oss")
public class FileStoreProperties {

    /**
     * 存储类型：local/minio/aliyun
     */
    private FileStoreTypeEnum type = FileStoreTypeEnum.LOCAL;

    /**
     * 服务地址
     */
    private String endpoint;

    /**
     * 认证账户
     */
    private String accessKey;

    /**
     * 认证密码
     */
    private String secretKey;

    /**
     * 默认桶
     */
    private String bucket;

    /**
     * 路径前缀【type为local时生效】
     */
    private String prefix;

    /**
     * nginx代理
     */
    private String nginxHost;

}
